//
//  FistViewController.m
//  UI-09-作业
//
//  Created by dllo on 16/6/16.
//  Copyright © 2016年 dllo. All rights reserved.
//
#define  ScreenHeight  [UIScreen mainScreen].bounds.size.height
#import "FistViewController.h"
#import "ThirdViewController.h"
#import "SecondViewController.h"
#import "OtherViewController.h"
#import "MYsegmentController.h"
@interface FistViewController ()

@end

@implementation FistViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     self.navigationItem.title = @"第一页";
    self.navigationController.navigationBar.translucent = NO;
    self.view.backgroundColor = [UIColor redColor];
    // Do any additional setup after loading the view.
//    [self creatBarItem];
//    [self creatSagement];
  
    
    UIImageView  *imag = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 414, ScreenHeight - 64 - 49)];
    imag.image =  [UIImage imageNamed:@"QQ"];
    [self.view addSubview:imag];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

//- (void)creatSagement{
//    MYsegmentController *segment = [[MYsegmentController alloc]initWithItems:@[@"消息", @"电话"]];
//    segment.frame = CGRectMake(150, 50, 100, 50);
//    segment.backgroundColor = [UIColor grayColor];
//    [self.view addSubview:segment];
//    [segment release];
//    [segment addTarget:self action:@selector(segmentAction:) forControlEvents:UIControlEventValueChanged];
//}
//
//-(void)segmentAction:(MYsegmentController *)segement{
//    OtherViewController *secondVC = [[OtherViewController alloc]init];
//    ThirdViewController * thirdVC = [[ThirdViewController alloc] init];
//    if (segement.selectedSegmentIndex == 1) {
//        
//        [self.navigationController pushViewController:secondVC animated:YES];
//    }else{
//        [self.navigationController pushViewController:thirdVC animated:YES];
//    }
//    
//}
//-(void)creatBarItem{
//    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"向下" style:UIBarButtonItemStylePlain target:self action:@selector(rightAction:)];
//    self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:@"返回" style:UIBarButtonItemStylePlain target:self action:@selector(leftAction:)];
//    
//}
//-(void)rightAction:(UIBarButtonItem *)rightBarButtonItem{
//    
//    
//}
//-(void)leftAction:(UIBarButtonItem *)rightBarButtonItem{
//    
//}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
